import {Component, OnInit} from '@angular/core';
import {SkinService} from '@kylin/core';

@Component({
    selector: 'kylin-skin',
    templateUrl: './skin.component.html',
    styleUrls: ['./skin.component.less']
})
export class SkinComponent implements OnInit {

    skinList: any[];

    constructor(private skinService: SkinService) {

    }

    ngOnInit() {
        this.skinList = this.skinService.getSkinList();
    }

    changeSkin(color: string) {
        console.log('皮肤切换开始');
        this.skinService.change(color).then(res => {
            console.log(res);
            console.log('皮肤切换完成');
        })
    }

}
